<?php
/**
 * @ClassName: InvoiceEnum
 * @Description: 发票枚举
 * @author: gydtrade
 * @Date: 2025-11-25 13:25
 * @Version: V1.0.0
 */

namespace app\common\enum;

class InvoiceEnum
{
    const invoice_type_none = 0;
    const invoice_type_regular = 1;
    const invoice_type_special = 2;

    public static function typeText($status)
    {
        $desc = [
            InvoiceEnum::invoice_type_none => '无',
            InvoiceEnum::invoice_type_regular => '普票',
            InvoiceEnum::invoice_type_special => '专票',
        ];
        if ($status === true) {
            return $desc;
        }
        return $desc[$status] ?? $status;
    }

    public static function taxText($status)
    {
        $desc = [
            1 => '1%',
            3 => '3%',
            6 => '6%',
            9 => '9%',
            13 => '13%',
        ];
        if ($status === true) {
            return $desc;
        }
        return $desc[$status] ?? $status;
    }

}